package com.ljkj.blockpay.ui.adapter;

import android.view.View;
import android.widget.ImageView;
import android.widget.SectionIndexer;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.kongzue.baseokhttp.util.JsonMap;
import com.ljkj.blockpay.R;
import com.ljkj.blockpay.model.CommonModel;
import com.ljkj.blockpay.model.UserModel;
import com.ljkj.blockpay.util.GlideUtil;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by yp on 2022/3/11
 */
public class CountryAdapter extends BaseQuickAdapter<JsonMap,BaseViewHolder>{

    public CountryAdapter(int layoutResId) {
        super(layoutResId);
    }


    @Override
    protected void convert(@NonNull BaseViewHolder helper, JsonMap jsonMap) {
        ImageView countryicon = helper.getView(R.id.iv_countryicon);
        helper.setText(R.id.tv_countryname,jsonMap.getString("countryName"));
        helper.setText(R.id.tv_countrycode,jsonMap.getString("countryCode"));
        Glide.with(getContext()).load(jsonMap.getString("countryIcon")).into(countryicon);
    }
}
